<template>
    <div class="producterrorExl">
        <Modal v-model="modal1" title="导出错误列表" width="632" @on-cancel="cancel">
            <Table :border="true" width="600" :columns="columns7" :data="data6"></Table>
            <div slot="footer">
            </div>
        </Modal>
    </div>
</template>
<script>
import { color } from 'echarts/lib/export';

export default {
    name:'producterrorExl',
    components: {},
    props: {
        producterrorExlheid: {
            typeof:Function,
        },
        data6: {
            typeof:Array
        },
        downloadxls: {
          typeof:Function  
        }
    },
   data() {
       return {
           modal1: true,
           total:100,
           columns7: [
               {
                   title: '门店ID',
                   key: 'storeCode',
                   
                   width: 150,
               },
               {
                   title: '文件名',
                   key: 'batchId',
                   render: (h, params) => {
                       console.log(h, params);
                       return h('div', [
                           h('buttom', {
                               props: {
                                   type: 'primary',
                                   size: 'small'
                               },
                               style: {
                                   marginRight: '5px',
                                   color: "#1240AF",
                                   cursor: "pointer"
                               },
                               on: {
                                   click: () => {
                                       this.show(params.row)
                                   }
                               }
                           }, '商品导入错误文件.xls'),
                       ]);
                   },
                   width: 300,
               },
               {
                   title: '操作',
                   key: 'action',
                   align: 'center',
                   render: (h, params) => {
                       return h('div', [
                           h('Button', {
                               props: {
                                   type: 'primary',
                                   size: 'small'
                               },
                               style: {
                                   marginRight: '5px'
                               },
                               on: {
                                   click: () => {
                                       this.show(params.row)
                                   }
                               }
                           }, '下载'),
                       ]);
                   },
                   width: 150,
               },
           ],
      }
   },
    created() {
        console.log(this.data6);
   },
   computed:{
   },
    methods: {
        cancel() {
            console.log("aaa");
            this.$emit("producterrorExlheid")
        },
        show(index) {
            this.$emit("downloadxls", index.batchId)
        }
   },
}
</script>
<style  scoped>
    .producterrorExl{
        width: 100%;
        height: 100%;
        /* background: rgba(0, 0, 0, 0.5); */
        position: fixed;
        left: 0;
        top: 0;
        z-index: 900;
    }
</style>
